merge with xen-unstable.hg (staging)
authorAlex Williamson <alex.williamson@hp.com>
Mon, 11 Jun 2007 19:46:42 +0000 (13:46 -0600)
committerAlex Williamson <alex.williamson@hp.com>
Mon, 11 Jun 2007 19:46:42 +0000 (13:46 -0600)
1  2 
tools/libxc/ia64/xc_ia64_hvm_build.c
tools/python/xen/xend/image.py
xen/arch/ia64/xen/mm.c
xen/include/public/arch-ia64.h

index f84ff787569fa929f9a27a8e690f7adfd7830e1f,0f41772fa13cc2630398f200bcb6cdb41621c583..076723af74c3721d3da35e1f651217cff627cfc9
@@@ -692,11 -767,7 +886,10 @@@ setup_guest(int xc_handle, uint32_t dom
      unsigned long dom_memsize = memsize << 20;
      unsigned long nr_pages = memsize << (20 - PAGE_SHIFT);
      unsigned long vcpus;
 -      unsigned long nvram_start = NVRAM_START, nvram_fd = 0; 
 +    unsigned long nr_special_pages;
 +    unsigned long memmap_info_pfn;
 +    unsigned long memmap_info_num_pages;
++    unsigned long nvram_start = NVRAM_START, nvram_fd = 0; 
      int rc;
      long i;
      DECLARE_DOMCTL;
          goto error_out;
      }
  
 -      xc_get_hvm_param(xc_handle, dom, HVM_PARAM_NVRAM_FD, &nvram_fd);
 -      if ( !IS_VALID_NVRAM_FD(nvram_fd) )
 -              nvram_start = 0;
 -      else
 -              if ( copy_from_nvram_to_GFW(xc_handle, dom, (int)nvram_fd ) == -1 )
 -                      nvram_start = 0;
 +    if (xc_ia64_setup_memmap_info(xc_handle, dom, dom_memsize,
 +                                  pfn_list, nr_special_pages,
 +                                  memmap_info_pfn, memmap_info_num_pages)) {
 +        PERROR("Could not build memmap info\n");
 +        goto error_out;
 +    }
 +    if (xc_ia64_setup_shared_info(xc_handle, dom,
 +                                  domctl.u.getdomaininfo.shared_info_frame,
 +                                  memmap_info_pfn, memmap_info_num_pages)) {
 +        PERROR("Could not setup shared_info\n");
 +        goto error_out;
 +    }
 +
++    xc_get_hvm_param(xc_handle, dom, HVM_PARAM_NVRAM_FD, &nvram_fd);
++    if ( !IS_VALID_NVRAM_FD(nvram_fd) )
++        nvram_start = 0;
++    else if ( copy_from_nvram_to_GFW(xc_handle, dom, (int)nvram_fd ) == -1 )
++        nvram_start = 0;
      vcpus = domctl.u.getdomaininfo.max_vcpu_id + 1;
  
      // Hand-off state passed to guest firmware 
index 8a6c9cb6dd1f518c01b35d8fc36533a1ab831f74,0bbd744e0824e8db54453cd7e2652616630a14fd..28f100bedc55c4488239f2706d6e20c732088faf
@@@ -469,11 -468,14 +468,15 @@@ class HVMImageHandler(ImageHandler)
  
  class IA64_HVM_ImageHandler(HVMImageHandler):
  
+     def buildDomain(self):
+         xc.nvram_init(self.vm.getName(), self.vm.getDomid())
+         return HVMImageHandler.buildDomain(self)
      def getRequiredAvailableMemory(self, mem_kb):
          page_kb = 16
 -        # ROM size for guest firmware, ioreq page, pio page and xenstore page
 -        extra_pages = 1024 + 4
 +        # ROM size for guest firmware, io page, xenstore page
 +        # buffer io page, buffer pio page and memmap info page
 +        extra_pages = 1024 + 5
          return mem_kb + extra_pages * page_kb
  
      def getRequiredInitialReservation(self):
Simple merge
index 508e95a9dd6373e0dfb3092f8a5cb5ad6d69fc46,470e3396148e544d7e7af9221ed56f4f5ccfa9cf..c7c9332008dde31a8e22546b0b507a4d6c940b5c
@@@ -77,11 -77,8 +77,12 @@@ typedef unsigned long xen_ulong_t
  
  #define MEM_G   (1UL << 30)
  #define MEM_M   (1UL << 20)
+ #define MEM_K   (1UL << 10)
  
 +/* Guest physical address of IO ports space.  */
 +#define IO_PORTS_PADDR          0x00000ffffc000000UL
 +#define IO_PORTS_SIZE           0x0000000004000000UL
 +
  #define MMIO_START       (3 * MEM_G)
  #define MMIO_SIZE        (512 * MEM_M)